package com.jsyh.maidu.activity;

import android.content.Intent;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;

import com.jsyh.maidu.R;

public class ArticleWebActivity extends BaseActivity {


    private WebView web;
    private String url;

    @Override
    public void initView() {
        super.initView();
        setContentView(R.layout.activity_article_web);
        web = (WebView) findViewById(R.id.article_web);
        web.setWebViewClient(new WebViewClient(){
            @Override
            public boolean shouldOverrideUrlLoading(WebView view, String url) {
                return false;
            }
        });
        WebSettings settings = web.getSettings();
        settings.setJavaScriptEnabled(true);
        web.loadUrl(url);
    }

    @Override
    public void initData() {
        super.initData();
        Intent intent = getIntent();
        url = intent.getStringExtra("url");

    }
}
